package com.atguigu.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.time.LocalDateTime;
import java.util.List;

//订单: 谁在某个时间花多少钱  。 具体的买了哪些东西在订单详情表中才会体现
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "t_order")
public class OrderBean  {
    private Integer id ;
    private String orderNo ;//订单编号
    private LocalDateTime orderDate ;//订单日期
    private Double orderMoney ;//订单金额
    private Integer orderCount ;//订单中商品总数量
    private Integer orderStatus ;//订单状态：未发货、已发货、已收货等
    private User user ;         //订单所属用户   M:1
    private List<OrderDetail> orderDetailList ;//一个订单包含多个订单详情 1:N
    }
